import { defineStore } from "pinia";

export const useCounterStore = defineStore("counter", {
  persist: true,
  state() {
    return {
      token: "111",
      userinfo: {},
      data: {},
      num: 0,
    };
  },
  actions: {
    sethomeList(data) {
      this.list = data;
    },
    setUserinfo(info) {
      this.userinfo = info;
    },
    setToken(token) {
      this.token = token;
    },
    setNum(num) {
      this.num = num;
    },
  },
});
